package StudyCode.summary.mydatetime;

import java.util.Calendar;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CalendarBefore {
	public static void main(String[] args) {
		Calendar old = Calendar.getInstance();
		old.set(Calendar.YEAR, 2000);
		Calendar now = Calendar.getInstance();
		System.out.println("old:" + old.getTime());
		System.out.println("now:" + now.getTime());
		System.out.println("old 日期是在 now之前? : " + old.before(now));
	}
}
